package iut.acy.cut4u.Test;

import iut.acy.cut4u.model.CategorieEmploye;
import iut.acy.cut4u.model.Client;
import iut.acy.cut4u.model.Conge;
import iut.acy.cut4u.model.Employe;
import iut.acy.cut4u.model.Horaire;
import iut.acy.cut4u.model.RendezVous;
import iut.acy.cut4u.model.Sexe;
import iut.acy.cut4u.model.StatutEmploye;

import java.util.ArrayList;
import java.util.GregorianCalendar;

import junit.framework.TestCase;

public class RendezVousDAOTest extends TestCase {

	RendezVous rv;
	GregorianCalendar gc;
	Horaire hDeb;
	Horaire hFin;
	Horaire hVide;
	Employe e;
	Client c;
	
	protected void setUp() throws Exception {
		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}
	
	public int deleteDAOTest(Object o, boolean enCascade)
	{
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(8,0);
		hFin=new Horaire(9,0);
		e=new Employe(2, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(2,null,null, null, null,null);
		rv = new RendezVous(2, gc, hDeb, hFin, e, c);
		//assertTrue();
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(10,0);
		e=new Employe(4, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(4,null,null, null, null,null);
		rv = new RendezVous(4, gc, hDeb, hVide, e, c);
		//assertTrue();
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(10,0);
		e=new Employe(4, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(-2,null,null, null, null,null);
		rv = new RendezVous(2, gc, hDeb, hVide, e, c);
		//assertFalse();
		return 0;
	}

	public int insertDAOTest(Object o)
	{
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(8,0);
		hFin=new Horaire(9,0);
		e=new Employe(2, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(2,null,null, null, null,null);
		rv = new RendezVous(2, gc, hDeb, hFin, e, c);
		//assertTrue();
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(10,0);
		e=new Employe(4, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(4,null,null, null, null,null);
		rv = new RendezVous(4, gc, hDeb, hVide, e, c);
		//assertTrue();
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(10,0);
		e=new Employe(4, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(-2,null,null, null, null,null);
		rv = new RendezVous(2, gc, hDeb, hVide, e, c);
		//assertFalse();
		return 0;
	}

	public int updateDAOTest(Object o)
	{
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(8,0);
		hFin=new Horaire(9,0);
		e=new Employe(2, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(2,null,null, null, null,null);
		rv = new RendezVous(2, gc, hDeb, hFin, e, c);
		//assertTrue();
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(10,0);
		e=new Employe(4, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(4,null,null, null, null,null);
		rv = new RendezVous(4, gc, hDeb, hVide, e, c);
		//assertTrue();
		gc=new GregorianCalendar(2013,10,15);
		hDeb=new Horaire(10,0);
		e=new Employe(4, null,null, null, null,null, null,null, null, null,  null, null);
		c=new Client(-2,null,null, null, null,null);
		rv = new RendezVous(2, gc, hDeb, hVide, e, c);
		//assertFalse();
		return 0;
	}
}
